package com.ys.web.yinsheng.model;

import com.ys.utils.base.j2se.DateHandler;
import com.ys.utils.base.j2se.StringHandler;

/**
 * @Author: dhf
 * @ClassName: YinShengMerchantInfo
 * @Date: 2022/7/21 14:37
 * @Description:
 * @Version: 1.0
 */
public class YinShengMerchantInfo {
    public String notifyType;//通知类型 01-进件通知  02-报备通知
    public String remark;//	M	描述
    public String status;//	O	状态 01-成功、02-转人工审核 03-审核拒绝、04-报备失败
    public String outMerchantNo;//外部商户号
    public String merchantNo;//银盛商户号
    public String alipayMerchantNo;//支付宝商户号
    public String wxMerchantNo;//微信商户号

    public long createTime;

    public long updateTime;

    public YinShengMerchantInfo(){

    }

    public YinShengMerchantInfo(BizResponseJson bizResponseJson, MerchantInfo merchantInfo, ReportInfo reportInfo) {
        this.notifyType= bizResponseJson.notifyType;
        this.remark=bizResponseJson.remark;
        this.status=bizResponseJson.status;
        if(StringHandler.isNotEmpty(merchantInfo)){
            this.merchantNo=merchantInfo.merchantNo;
            this.outMerchantNo=merchantInfo.outMerchantNo;
        }
        if(StringHandler.isNotEmpty(reportInfo)){
            this.alipayMerchantNo=reportInfo.alipayMerchantNo;
            this.wxMerchantNo=reportInfo.wxMerchantNo;
            this.merchantNo=reportInfo.merchantNo;
            this.outMerchantNo=reportInfo.outMerchantNo;
        }
        this.createTime = DateHandler.getLongFormatDate();
        this.updateTime = this.createTime;
    }
}
